package com.techstar.ats.dxp.history.rep;

import java.util.LinkedList;
import java.util.List;

import com.techstar.ats.dxp.CsvFormatter;
import com.techstar.ats.dxp.history.AbstractReport;

public abstract class AbstractReportItem<T extends CsvFormatter> extends AbstractReport {
	private static final long serialVersionUID = 1L;
	public final List<T> items = new LinkedList<>();
	public int total;
	public int sequence;

	public boolean toCsvString(StringBuffer sb) {
		this.items.forEach((item) -> {
			sb.append(this.line)
				.append(',');
			item.toCsvString(sb);
			sb.append(System.lineSeparator());
		});
		return false;
	}
}
